package com.bestcem.xm.ticket.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.ticket.controller.param.FollowTicketParam;
import com.bestcem.xm.ticket.controller.param.ReopenTicketParam;
import com.bestcem.xm.ticket.controller.param.ticket.InsertTicketParam;
import com.bestcem.xm.ticket.controller.param.ticket.TransferTicketParam;
import com.bestcem.xm.ticket.controller.vo.SimpleIdVO;
import com.bestcem.xm.ticket.service.dto.ticket.CloseTicketDTO;

/**
 * 工单的各类操作
 * 手动创建/转派/关闭/重新打开/跟进
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version dingtalk
 * @date 2021/12/7 14:40
 */
public interface TicketOperateService {

    /**
     * 手动创建工单
     *
     * @return ticket_record的id
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/8/19 19:44
     */
    ServiceResult<SimpleIdVO> createTicket(InsertTicketParam param);


    /**
     * 跟进工单
     *
     * @return 工单id
     * @author liheng
     * @date 2021/8/26 16:57
     */
    ServiceResult<String> followTicket(FollowTicketParam param);


    /**
     * 转派工单
     *
     * @param param 工单转派参数
     * @author liheng
     * @author 2021/12/7 15:03 XiaoYunSong <ys.xiao@idiaoyan.com> 工单对接钉钉需求, 新增组织转派, 同时转派时重新分配工单组织
     * @date 2021/9/8 18:07
     */
    ServiceResult<SimpleIdVO> transferTicket(TransferTicketParam param);


    /**
     * 关闭工单
     *
     * @return ticket_record的id
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/8/19 19:44
     */
    ServiceResult<SimpleIdVO> closeTicket(CloseTicketDTO param);


    /**
     * 重新打开工单
     *
     * @return ticket_record的id
     * @author zq.ding <zq.ding@idiaoyan.com>
     * @date 2021/8/19 19:44
     */
    ServiceResult<SimpleIdVO> reopenTicket(ReopenTicketParam param);

}
